package org.dxw.common.excel;

import lombok.Data;
import lombok.Getter;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;
import java.util.function.Function;

/**
 * @Author dxw
 * @Date 2023/1/1 12:58
 * @Description
 */
@Data
public class MergeParam<T, U> {

    private static final Object lastObject = new Object();

    public MergeParam(Function<? super T, ? extends U> keyExtractor, List<Integer> mergeColumnIndex) {
        this.keyExtractor = keyExtractor;
        this.mergeColumnIndex = mergeColumnIndex;
    }

    private Function<? super T, ? extends U> keyExtractor;

    private List<Integer> mergeColumnIndex;



    private int mergeNum;

    private List<Integer> mergeRowIndexStart;

    private List<Integer> mergeRowIndexEnd;

    //初始值为一个对象
    private Object lastKeyVal = lastObject;

}